package com.mezz.bones.framework.crypto.config;

import com.mezz.bones.framework.crypto.resolve.MyEncryptablePropertyResolver;
import com.ulisesbocchio.jasyptspringboot.EncryptablePropertyResolver;
import org.springframework.boot.autoconfigure.AutoConfiguration;
import org.springframework.context.annotation.Bean;

/**
 * 加密解密自动配置类
 * 
 * @Author: zhuang
 * @Date: 2024/17/6 16:47
 * @Description: 自动配置加密解密相关组件
 * @Version: 1.0
 **/
@AutoConfiguration
public class CryptoAutoConfiguration {

    /**
     * 注册自定义的配置属性解密器
     * 
     * @return EncryptablePropertyResolver
     */
    @Bean(name = "encryptablePropertyResolver")
    public EncryptablePropertyResolver encryptablePropertyResolver() {
        return new MyEncryptablePropertyResolver();
    }
}